/*
 * @Author: ✨Fireflx 
 * @Date: 2022-02-14 17:58:45 
 * @Last Modified by: ✨Fireflx
 * @Last Modified time: 2022-03-03 11:04:11
 */

const mongoose = require('mongoose')

module.exports = () => {
    mongoose.connect('mongodb://127.0.0.1:27017/kelin', {
        //当数据库没有此表时自动创建
        useUnifiedTopology: true,
        useNewUrlParser: true
    }).then(() => {
        console.log('KelinDB Connect Successfully!');
    }).catch(err => {
        console.error('DataBase connect Failed! %s', err)
    })
}